package obj.day5;

/**
 * @author げっしょく
 * @date 2021/7/21
 */
public class Test11 {
    public static void main(String[] args) {
        int a = 0;
        int i = 1;
        int moon =1;
         prin(a , i , moon);
    }

    private static void prin(int a, int i, int moon) {
        if(moon == 1 || moon == 2){
            i = 1 ;
            a = 0;
            moon ++;
            prin(a , i ,moon);
        }else if(moon == 20){
            System.out.println(a + i);
            return ;
        }else{
            a = i ;
            i += a;
            moon++;
            prin(a , i ,moon);
        }

    }
}
